<div class="giveHeight"> 
    <table class="responsive dynamicTable display table table-bordered dataTable">

        <thead> 
            <tr>
                                        {{ knp_pagination_sortable(pagination, 'Réference', 'a.reference') }}
                                         {{ knp_pagination_sortable(pagination, 'Désignation', 'a.designation') }}
                    <th>Quantite</th>
                    {% if app.session.get('stock') == code %}
                        <td>Quantite Noir</td>
                        <td>Somme quantite</td>
                {% endif %}
                        <th>Quantite Min</th>
                    </tr>
                </thead>
{# table body #}
{% for stock in pagination %}
                <tr {% if loop.index is odd %}class="color"{% endif %}>
                    <td>{{ stock.reference }}</td>
                    <td>{{ stock.designation }}</td>
                    <td>{{stock.quantite|number_format(stock.chiffre_virgule)}} {{stock.code}}</td>
                {% if app.session.get('stock') == code %}
                    <td>{{stock.quantite_noir|number_format(stock.chiffre_virgule)}} {{stock.code}}</td>
                    <td>{{(stock.quantite+stock.quantite_noir)|number_format(stock.chiffre_virgule)}} {{stock.code}}</td>
                {% endif %}
                    <td>{{stock.quantite_min|number_format(stock.chiffre_virgule)}} {{stock.code}}</td>

                </tr>
{% endfor %}
            </table>
        </div>
        <div id="DataTables_Table_0_info" class="dataTables_info">Affichage de {{ (pagination.getCurrentPageNumber -1)*pagination.getItemNumberPerPage + 1}} à {{ (pagination.getCurrentPageNumber -1)*pagination.getItemNumberPerPage + pagination.getItemNumberPerPage}} de {{ pagination.getTotalItemCount }} Articles</div>
{# display navigation #}
        <div id="DataTables_Table_0_paginate" class="dataTables_paginate paging_full_numbers">
    {{ knp_pagination_render(pagination) }}
            </div>


